# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: David Runge <dave@sleepmap.de>
# Contributor: tobias <tobias@archlinux.net>
# Contributor: Robert Emil Berge <robert@rebi.no>

pkgname=jack
pkgver=0.125.0
pkgrel=5
pkgdesc="A low-latency audio server"
arch=('x86_64')
license=('GPL' 'LGPL')
depends=('libsamplerate' 'db' 'zita-alsa-pcmi' 'zita-resampler')
makedepends=('celt' 'doxygen' 'git' 'libffado')
optdepends=('celt: NetJACK driver'
            'libffado: FireWire support'
            'realtime-privileges: Acquire realtime privileges')
url="http://jackaudio.org/"
source=("$pkgname::git+https://github.com/jackaudio/${pkgname}1.git#tag=${pkgver}"
        "git+https://github.com/jackaudio/example-clients"
        "git+https://github.com/jackaudio/headers"
        "git+https://github.com/jackaudio/tools")
md5sums=('SKIP'
         'SKIP'
         'SKIP'
         'SKIP')

prepare() {
  mv -v "${pkgname}" "${pkgname}-${pkgver}"
  cd "${pkgname}-${pkgver}"
  git submodule init
  git config submodule.example-clients.url "${srcdir}/example-clients"
  git config submodule.jack.url "${srcdir}/headers"
  git config submodule.tools.url "${srcdir}/tools"
  git submodule update
  autoreconf -vfi
}

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr \
              --libdir=/usr/lib
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="$pkgdir" install
}
# vim:set ts=2 sw=2 et:

